package vivek.project.pocketmoney.investments.scripts
{
	import flash.data.*;
	import flash.errors.*;

	public class InvestmentSQLScript
	{
		public static const ADD_NEW_BULLIONTRANSACTION:String="INSERT INTO bullionmanager (bm_id,bm_type,bm_accountid,bm_channelid,bm_transactiontype,bm_transactiondate,bm_quantity,bm_costper10g,bm_othercharges,bm_remarks)" + "VALUES (:bm_id,:bm_type,:bm_accountid,:bm_channelid,:bm_transactiontype,:bm_transactiondate,:bm_quantity,:bm_costper10g,:bm_othercharges,:bm_remarks)";
		public static const ADD_NEW_INVESTMENTRECURSSION:String="INSERT INTO fixedincomerecurssion (fr_name,fr_status,fr_startdate,fr_enddate,fr_percent,fr_date,fr_type,fr_account,fr_amount,fr_nextexecution,fr_investid,fr_investperiod,FR_USERID) values (:fr_name,:fr_status,:fr_startdate,:fr_enddate,:fr_percent,:fr_date,:fr_type,:fr_account,:fr_amount,:fr_nextexecution,:fr_investid,:fr_investperiod,:USERID)";
		public static const ADD_NEW_INVESTMENTTRANSACTION:String="INSERT INTO fixedincomemanager (fm_investmentid,fm_type,fm_accountid,fm_channelid,fm_investmentdate,fm_investmentamount, fm_investmentname,fm_comments,fm_percent,fm_maturityamount,fm_investperiod,fm_status,fm_maturitydate,fm_recurring,FM_USERID) VALUES " + "(:fm_investmentid,:fm_type,:fm_accountid,:fm_channelid,:fm_investmentdate,:fm_investmentamount, :fm_investmentname,:fm_comments,:fm_percent,:fm_maturityamount,:fm_investperiod,:fm_status,:fm_maturitydate,:fm_recurring,:USERID)";
		public static const BULLION_GET_DATA_ALL:String="SELECT * FROM bullionmanager,investmenttype,accountmanager  where it_investmenttypeid = bm_type and bm_accountid=am_accountid and am_userid = :USERID ORDER BY bm_transactiondate";
		public static const CLEAR_SELL_FIXED_INCOME_TRANSACTION:String="UPDATE fixedincomemanager SET fm_sellamount=0,fm_selldate=null,fm_sellaccount=0,fm_selltxnid=0 where fm_investmentid=:fm_investmentid";
		public static const DELETE_INVESTMENT:String="delete from fixedincomemanager where :fm_investmentid = fm_investmentid";
		public static const FIXEDINCOME_GET_DATA_ALL:String="SELECT * FROM fixedincomemanager  where FM_userid=:USERID ORDER BY fm_investmentdate";
		public static const GET_DATA_FIXEDINCOME_RECURUSSION:String="SELECT * FROM FIXEDINCOMERECURSSION where fr_userid=:USERID";
		public static const INVESTMENTTYPE_GET_DATA_ALL:String="SELECT * FROM investmenttype ORDER BY it_investmenttypename";
		public static const SELL_INVESTMENT_TRANSACTION:String="UPDATE fixedincomemanager SET fm_sellamount=:fm_sellamount,fm_selldate=:fm_selldate,fm_sellaccount=:fm_sellaccount,fm_selltxnid=:fm_selltxnid where fm_investmentid=:fm_investmentid";
		public static const UPDATE_BULLIONTRANSACTION:String="UPDATE bullionmanager set bm_type= :bm_type,bm_accountid=:bm_accountid,bm_channelid=:bm_channelid,bm_transactiontype=:bm_transactiontype,bm_transactiondate=:bm_transactiondate,bm_quantity=:bm_quantity,bm_costper10g=:bm_costper10g,bm_othercharges=:bm_othercharges,bm_remarks =:bm_remarks WHERE bm_id = :bm_id";
		public static const UPDATE_FIXED_INCOME_TRANSACTION:String="UPDATE fixedincomemanager SET fm_type=:fm_type,fm_accountid=:fm_accountid,fm_channelid=:fm_channelid,fm_investmentdate=:fm_investmentdate,fm_investmentamount=:fm_investmentamount, fm_investmentname=:fm_investmentname,fm_comments=:fm_comments,fm_percent=:fm_percent,fm_maturityamount=:fm_maturityamount,fm_investperiod=:fm_investperiod,fm_status=:fm_status,fm_maturitydate=:fm_maturitydate WHERE fm_investmentid=:fm_investmentid ";
	}
}